#include <stdio.h>
#include <string.h>
#define STR_ROW 3
#define STR_COL 20
void put_arr1(char(*)[],int row);
void sort_arr(char(*)[],int row);
int main(void)
{
	//char arr[STR_ROW][STR_COL] = {"jin","zhang","scchary"};
	char arr[STR_ROW][STR_COL];
	memset(arr,'\0',STR_ROW * STR_COL);
	for(int i = 0;i < STR_ROW;i++)
	{
		scanf("%s",&arr[i]);
	}
	sort_arr(arr,STR_ROW);
	put_arr1(arr,STR_ROW);
	return 0;
}
void sort_arr(char(*arr)[20],int row)
{
	//char(*arr)[col] = (char(*arr)[col])c;
	int min_index = 0;
	char temp[20];
	for(int i = 0;i < row - 1;i++)
	{
		min_index = i;
		for(int j = i;j < row;j++)
		{
			if(0 < strcmp(arr[min_index],arr[j]))
			{
				min_index = j;
			}
		}
		if(min_index != i)
		{
			strcpy(temp,arr[min_index]);
			strcpy(arr[min_index],arr[i]);
			strcpy(arr[i],temp);
		}
	}
}
void put_arr1(char(*p)[20],int row)
{
	for(int i = 0;i < row;i++)
	{
		printf("arr[%d] = %s\n",i,p + i);
	}
}
